
{capture name="hidden"}	
<input type="hidden" name="admin" value="1">
<input type="hidden" name="form_filter[form_object_id]" value="{$smarty.get.form_object_id}">
{/capture}
{capture name="fields"}	
	<!-- * -->
	<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
			<td height="1" bgcolor="#FFFFFF"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
		</tr>
	</table>
	<table cellpadding="0" cellspacing="0" style=" border-bottom:1px solid white " width="100%">
		<tr>
			<td width="20" height="30"><img src="_tvs_system_core_/design/img/icon_new_doc.gif"></td>		
			<td width="1"><nobr><a href="javascript:fCreateFilterSelector();" target="_self">{t t='Pridėti filtrą'}</a></td>
			<td width="20"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>	
			<td width="1" bgcolor="#ffffff"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
			<td width="20"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
			<td width="20" height="30"><img src="_tvs_system_core_/design/img/admin/_icon_delete.gif"></td>		
			<td width="1"><nobr><a href="javascript:fDeleteAllFilters ();" target="_self">{t t='Šalinti visus'}</a></td>
			<td width="20"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>			
			<td><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
		</tr>
	</table>	
	<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
			<td height="1" bgcolor="#D6DBDE"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>			
		</tr>
		<tr>
			<td height="1" bgcolor="#ffffff"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>			
		</tr>
	</table>	
	<span id="filter" style="height:30px">	
	<table width="100%" cellpadding="0" cellspacing="0" id="no_filter">
		<tr>
			<td height="80" bgcolor="#ffffff" align="center">{t t="Nėra nei vieno filtro"}</td>			
		</tr>		
	</table>	
	<!-- * TEMPLATE: item -->
	<span id="template" style="{* /* *}visibility:hidden; position:absolute{* */ *}; width:100% ">	
	<table width="100%" cellpadding="0" cellspacing="0">		
		<tr>
			<td width="110" align="left">
				<select name="operator" style="border:1px solid #A8B3B8; width:100px;" disabled>										
						<option value="AND">{t t="Privalomas"}</option>		
						<option value="NOT">{t t="Negalimas"}</option>			
				</select>
			</td>
			<td>			
			{ext->get_form_saved_data_by_form_object_id parent=$smarty.get.form_object_id assign="form_fields"}			
				<select name="field" style="border:1px solid #A8B3B8; width:150px;" onChange="fPopulateValueSelector(this,this.parentNode.parentNode.childNodes[3].firstChild,this.parentNode.parentNode.childNodes[0].firstChild)">					
					<option value="">{t t='Pasirinkite lauką'}</option>
					{foreach from=$form_fields.names item="el"}
						<option value="{$el}">{$el}</option>
					{/foreach}					
				</select>
			</td>
			<td width="10" height="30">=</td>	
			<td align="right">
				<select name="value" style="border:1px solid #A8B3B8; width:170px;" disabled>					
					{*foreach from=$form_fields.values item="el"}
						<option value="{$el.value}">{$el.value}</option>
					{/foreach*}					
				</select>
			</td>			
			<td width="30" align="center"><img src="_tvs_system_core_/design/img/admin/_icon_delete.gif" onClick="fDeleteFilterSelector(this,this.parentNode.parentNode.parentNode.parentNode.parentNode)" style="cursor:pointer "></td>	
		</tr>
		<tr>
			<td colspan="5" style="border-bottom:1px solid white "><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
		</tr>
	</table>	
	</span>
	<!-- /*  TEMPLATE: item  -->	
	</span>
	<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
			<td height="1" bgcolor="#D6DBDE"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
		</tr>
	</table>
	<!-- /* -->
	<script language="javascript" type="text/javascript">			
		var oNoFilterMessage=document.getElementById('no_filter');	
		{foreach from=$form_fields.values item="el"}
			fRegisterFormFields('{$el.name|trim|escape:"quotes"|strip}','{$el.value|trim|escape:"quotes"|strip}');
		{/foreach}	
		{foreach from=$smarty.session.form_filter item="el" key="key"}					
			{if $el.field && $el.value && $el.operator && $key|trim!='form_object_id'}fCreateFilterSelector('{$el.field|trim|escape:"quotes"|strip}','{$el.value|trim|escape:"quotes"|strip}','{$el.operator|trim|escape:"quotes"|strip}');{/if}
		{/foreach}				
	</script>	
{/capture}


